/**
 * Created by tangting on 2017/9/12.
 */

import Vue from 'vue';
import tpl from './tpl.html';
import commonService from '../../../common/commonService';
import lib from '../../../common/lib'
import Loading from '../../../../grsc-base/component/Loading.vue';

export default Vue.extend({
    name: "started",
    template: tpl,
    components: {
        Loading
    },
    data(){
        return {
            isLoading: false,
            isMobile:lib.isMobile()
        }
    },
    mounted(){
        // if(!lib.isMobile()) {
        //     this.scrollAnimate();
        // }
    },
    methods: {
        scrollAnimate(){
            let vm = this;
            if($(".comp-started").offset().top<$(window).height()){
                this.setAnimateContBody();
            }
            $(window).on("scroll",()=>{
                if(( $(".comp-started").offset().top - $(window).scrollTop() ) < $(window).height()){
                    this.setAnimateContBody();
                }
            });
        },

        setAnimateContBody(){
            setTimeout(()=>{
                // $('.intro-list').addClass('animated-1s fadeIn fadeInDown');
                $('.intro-list').addClass('animated-1s fadeIn fadeInUp');;
            },200)
        },
    }
});
